﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HF.Software.Entities
{
    public class SpListData
    {
        public string spno { get; set; }
        public string HPNO { get; set; }
        public double HPCOUNT { get; set; }
    }

    public class SpListDataCollection : List<SpListData>
    { }

    public class SpDataCollection : List<ClsSpData>
    {
    }
    /// <summary>
    ///T0403_SP 表数据实体
    /// </summary>
    [Serializable]
    public class ClsSpData
    {
        #region 变量定义
        ///<summary>
        ///
        ///</summary>
        private string spno;
        ///<summary>
        ///
        ///</summary>
        private string spgroupno = String.Empty;
        ///<summary>
        ///
        ///</summary>
        private string spname = String.Empty;
        ///<summary>
        ///0 商品  1组合商品  2合成品 3原材料
        ///</summary>
        private string sptype = String.Empty;
        ///<summary>
        ///
        ///</summary>
        private string unitname = String.Empty;
        ///<summary>
        ///
        ///</summary>
        private double price;
        ///<summary>
        /// 0-不限制
        ///</summary>
        private double maxcount;
        ///<summary>
        ///
        ///</summary>
        private double sellcount;
        ///<summary>
        ///0-不需授权 1-需要授权
        ///</summary>
        private string auable = String.Empty;
        ///<summary>
        /// 0-可用 1-不可用
        ///</summary>
        private string usable = String.Empty;
        ///<summary>
        ///
        ///</summary>
        private string barcode = String.Empty;
        ///<summary>
        ///
        ///</summary>
        private string spmemo = String.Empty;
        //public ImageSource SpgrouppicSource;
        ///<summary>
        ///
        ///</summary>
        private object sppic;
        ///<summary>
        ///
        ///</summary>
        private string begdate = String.Empty;
        ///<summary>
        ///
        ///</summary>
        private string enddate = String.Empty;
        ///<summary>
        ///
        ///</summary>
        private string lastdate = String.Empty;
        ///<summary>
        ///
        ///</summary>
        private double alertcount;
        ///<summary>
        ///
        ///</summary>
        private double stockprice;
        ///<summary>
        ///
        ///</summary>
        private string kindname = String.Empty;
        ///<summary>
        ///
        ///</summary>
        private string coruleno = String.Empty;
        ///<summary>
        ///
        ///</summary>
        private double taxrate;
        /// <summary>
        /// 商品组名称
        /// </summary>
        private string spgroupname;

        /// <summary>
        /// 库存量
        /// </summary>
        private double quantity;


        private double sumquantity;
        #endregion

        #region 构造函数
        ///<summary>
        ///
        ///</summary>
        public ClsSpData()
        {
        }
        ///<summary>
        ///
        ///</summary>
        public ClsSpData
        (
            string _spno,
            string _spgroupno,
            string _spname,
            string _sptype,
            string _unitname,
            double _price,
            double _maxcount,
            double _sellcount,
            string _auable,
            string _usable,
            string _barcode,
            string _spmemo,
            object _sppic,
            string _begdate,
            string _enddate,
            string _lastdate,
            double _alertcount,
            double _stockprice,
            string _kindname,
            string _coruleno,
            double _taxrate,
            string _spgroupname,
            double _quantity,
            double _sumquantity
        )
        {
            spno = _spno;
            spgroupno = _spgroupno;
            spname = _spname;
            sptype = _sptype;
            unitname = _unitname;
            price = _price;
            maxcount = _maxcount;
            sellcount = _sellcount;
            auable = _auable;
            usable = _usable;
            barcode = _barcode;
            spmemo = _spmemo;
            sppic = _sppic;
            begdate = _begdate;
            enddate = _enddate;
            lastdate = _lastdate;
            alertcount = _alertcount;
            stockprice = _stockprice;
            kindname = _kindname;
            coruleno = _coruleno;
            taxrate = _taxrate;
            spgroupname = _spgroupname;
            quantity = _quantity;
            sumquantity = _sumquantity;

        }
        #endregion

        #region 公共属性

        ///<summary>
        ///
        ///长度:6 
        ///</summary>
        public string SPNO
        {
            get { return spno; }
            set { spno = value; }
        }

        ///<summary>
        ///
        ///长度:2 
        ///</summary>
        public string SPGROUPNO
        {
            get { return spgroupno; }
            set { spgroupno = value; }
        }

        ///<summary>
        ///
        ///长度:60 
        ///</summary>
        public string SPNAME
        {
            get { return spname; }
            set { spname = value; }
        }

        ///<summary>
        ///0 商品  1组合商品  2合成品 3原材料
        ///长度:1 
        ///</summary>
        public string SPTYPE
        {
            get { return sptype; }
            set { sptype = value; }
        }

        ///<summary>
        ///
        ///长度:20 
        ///</summary>
        public string UNITNAME
        {
            get { return unitname; }
            set { unitname = value; }
        }

        ///<summary>
        ///
        ///长度:0 
        ///</summary>
        public double PRICE
        {
            get { return price; }
            set { price = value; }
        }

        ///<summary>
        /// 0-不限制
        ///长度:0 
        ///</summary>
        public double MAXCOUNT
        {
            get { return maxcount; }
            set { maxcount = value; }
        }

        ///<summary>
        ///
        ///长度:0 
        ///</summary>
        public double SELLCOUNT
        {
            get { return sellcount; }
            set { sellcount = value; }
        }

        ///<summary>
        ///0-不需授权 1-需要授权
        ///长度:1 
        ///</summary>
        public string AUABLE
        {
            get { return auable; }
            set { auable = value; }
        }

        ///<summary>
        /// 0-可用 1-不可用
        ///长度:1 
        ///</summary>
        public string USABLE
        {
            get { return usable; }
            set { usable = value; }
        }

        ///<summary>
        ///
        ///长度:20 
        ///</summary>
        public string BARCODE
        {
            get { return barcode; }
            set { barcode = value; }
        }

        ///<summary>
        ///
        ///长度:60 
        ///</summary>
        public string SPMEMO
        {
            get { return spmemo; }
            set { spmemo = value; }
        }

        ///<summary>
        ///
        ///长度:4000 
        ///</summary>
        public object SPPIC
        {
            get { return sppic; }
            set { sppic = value; }
        }
        //注释 LiuHe 20121207
        //public byte[] SpPicData { get; set; }
        public string SpPicData { get; set; }

        //public ImageSource SpPicSource { get; set; }


        ///<summary>
        ///
        ///长度:10 
        ///</summary>
        public string BEGDATE
        {
            get { return begdate; }
            set { begdate = value; }
        }

        ///<summary>
        ///
        ///长度:10 
        ///</summary>
        public string ENDDATE
        {
            get { return enddate; }
            set { enddate = value; }
        }

        ///<summary>
        ///
        ///长度:10 
        ///</summary>
        public string LASTDATE
        {
            get { return lastdate; }
            set { lastdate = value; }
        }

        ///<summary>
        ///
        ///长度:0 
        ///</summary>
        public double ALERTCOUNT
        {
            get { return alertcount; }
            set { alertcount = value; }
        }

        ///<summary>
        ///
        ///长度:0 
        ///</summary>
        public double STOCKPRICE
        {
            get { return stockprice; }
            set { stockprice = value; }
        }

        ///<summary>
        ///
        ///长度:20 
        ///</summary>
        public string KINDNAME
        {
            get { return kindname; }
            set { kindname = value; }
        }

        ///<summary>
        ///
        ///长度:4 
        ///</summary>
        public string CORULENO
        {
            get { return coruleno; }
            set { coruleno = value; }
        }

        ///<summary>
        ///
        ///长度:0 
        ///</summary>
        public double TAXRATE
        {
            get { return taxrate; }
            set { taxrate = value; }
        }
        /// <summary>
        /// 商品组名称
        /// </summary>
        public string SPGROUPNAME
        {
            get { return spgroupname; }
            set { spgroupname = value; }
        }

        /// <summary>
        /// 库存数量
        /// </summary>
        public double QUANTITY
        {
            get { return quantity; }
            set { quantity = value; }
        }

        public double SUMQUANTITY
        {
            get { return sumquantity; }
            set { sumquantity = value; }
        }
        /// <summary>
        /// 0为分类名称，1为商品名
        /// </summary>
        public string Flag { get; set; }
        #endregion

        public double HPCOUNT { get; set; }
        /// <summary>
        /// 金逸套餐价格
        /// </summary>
        public double PACKAGEPRICE { get; set; }
        /// <summary>
        /// 金逸商品勾选价格
        /// </summary>
        public bool IsBatch { get; set; }
        /// <summary>
        /// 金逸促销价格
        /// </summary>
        public double PROMOTIONPRICE { get; set; }
        /// <summary>
        /// 促销ID
        /// </summary>
        public string PROMOTIONID { get; set; }
    }
}
